<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: arm_compute::graph_utils Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.03</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.xhtml"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.xhtml"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('namespacearm__compute_1_1graph__utils.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">arm_compute::graph_utils Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml">CaffePreproccessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Caffe preproccessor.  <a href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml">DummyAccessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dummy accessor class.  <a href="classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Preprocessor interface.  <a href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_num_py_bin_loader.xhtml">NumPyBinLoader</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Numpy Binary loader class.  <a href="classarm__compute_1_1graph__utils_1_1_num_py_bin_loader.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_p_p_m_accessor.xhtml">PPMAccessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">PPM accessor class.  <a href="classarm__compute_1_1graph__utils_1_1_p_p_m_accessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_p_p_m_writer.xhtml">PPMWriter</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">PPM writer class.  <a href="classarm__compute_1_1graph__utils_1_1_p_p_m_writer.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_random_accessor.xhtml">RandomAccessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Random accessor class.  <a href="classarm__compute_1_1graph__utils_1_1_random_accessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml">TFPreproccessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">TF preproccessor.  <a href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_top_n_predictions_accessor.xhtml">TopNPredictionsAccessor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Result accessor class.  <a href="classarm__compute_1_1graph__utils_1_1_top_n_predictions_accessor.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab7e905c7bfd2944e67bd069a3de3e7a2"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml#ab7e905c7bfd2944e67bd069a3de3e7a2">get_random_accessor</a> (<a class="el" href="classarm__compute_1_1_pixel_value.xhtml">PixelValue</a> lower, <a class="el" href="classarm__compute_1_1_pixel_value.xhtml">PixelValue</a> upper, const std::random_device::result_type seed=0)</td></tr>
<tr class="memdesc:ab7e905c7bfd2944e67bd069a3de3e7a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates appropriate random accessor.  <a href="#ab7e905c7bfd2944e67bd069a3de3e7a2">More...</a><br /></td></tr>
<tr class="separator:ab7e905c7bfd2944e67bd069a3de3e7a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73a37a4970294106ed22e8f916ef3810"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml#a73a37a4970294106ed22e8f916ef3810">get_weights_accessor</a> (const std::string &amp;path, const std::string &amp;data_file)</td></tr>
<tr class="memdesc:a73a37a4970294106ed22e8f916ef3810"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates appropriate weights accessor according to the specified path.  <a href="#a73a37a4970294106ed22e8f916ef3810">More...</a><br /></td></tr>
<tr class="separator:a73a37a4970294106ed22e8f916ef3810"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9984cc47279cdb732b7b83caf0627de6"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml#a9984cc47279cdb732b7b83caf0627de6">get_input_accessor</a> (const std::string &amp;ppm_path, std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a> &gt; preprocessor=nullptr, bool bgr=true)</td></tr>
<tr class="memdesc:a9984cc47279cdb732b7b83caf0627de6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates appropriate input accessor according to the specified ppm_path.  <a href="#a9984cc47279cdb732b7b83caf0627de6">More...</a><br /></td></tr>
<tr class="separator:a9984cc47279cdb732b7b83caf0627de6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9216738b309b6b230b7ba8bca5ba7477"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearm__compute_1_1graph.xhtml#a8d5e69e9a697c2007e241eb413c9833b">graph::TargetHint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml#a9216738b309b6b230b7ba8bca5ba7477">set_target_hint</a> (int target)</td></tr>
<tr class="memdesc:a9216738b309b6b230b7ba8bca5ba7477"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function to return the TargetHint.  <a href="#a9216738b309b6b230b7ba8bca5ba7477">More...</a><br /></td></tr>
<tr class="separator:a9216738b309b6b230b7ba8bca5ba7477"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf0c8eff756108c8bb23aecf51d44f79"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml#aaf0c8eff756108c8bb23aecf51d44f79">get_output_accessor</a> (const std::string &amp;labels_path, size_t top_n=5, std::ostream &amp;output_stream=std::cout)</td></tr>
<tr class="memdesc:aaf0c8eff756108c8bb23aecf51d44f79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates appropriate output accessor according to the specified labels_path.  <a href="#aaf0c8eff756108c8bb23aecf51d44f79">More...</a><br /></td></tr>
<tr class="separator:aaf0c8eff756108c8bb23aecf51d44f79"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a9984cc47279cdb732b7b83caf0627de6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::unique_ptr&lt;<a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a>&gt; arm_compute::graph_utils::get_input_accessor </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>ppm_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a> &gt;&#160;</td>
          <td class="paramname"><em>preprocessor</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bgr</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates appropriate input accessor according to the specified ppm_path. </p>
<dl class="section note"><dt>Note</dt><dd>If ppm_path is empty will generate a <a class="el" href="classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml" title="Dummy accessor class. ">DummyAccessor</a> else will generate a <a class="el" href="classarm__compute_1_1graph__utils_1_1_p_p_m_accessor.xhtml" title="PPM accessor class. ">PPMAccessor</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ppm_path</td><td>Path to PPM file </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">preprocessor</td><td>Preproccessor object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bgr</td><td>(Optional) Fill the first plane with blue channel (default = true)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An appropriate tensor accessor </dd></dl>

<p>Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00256">256</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;{</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <span class="keywordflow">if</span>(ppm_path.empty())</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    {</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;DummyAccessor&gt;();</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    }</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    {</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;PPMAccessor&gt;(ppm_path, bgr, std::move(preprocessor));</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aaf0c8eff756108c8bb23aecf51d44f79"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::unique_ptr&lt;<a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a>&gt; arm_compute::graph_utils::get_output_accessor </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>labels_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>top_n</em> = <code>5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>output_stream</em> = <code>std::cout</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates appropriate output accessor according to the specified labels_path. </p>
<dl class="section note"><dt>Note</dt><dd>If labels_path is empty will generate a <a class="el" href="classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml" title="Dummy accessor class. ">DummyAccessor</a> else will generate a <a class="el" href="classarm__compute_1_1graph__utils_1_1_top_n_predictions_accessor.xhtml" title="Result accessor class. ">TopNPredictionsAccessor</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">labels_path</td><td>Path to labels text file </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">top_n</td><td>(Optional) Number of output classes to print </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_stream</td><td>(Optional) Output stream</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An appropriate tensor accessor </dd></dl>

<p>Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00300">300</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;{</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordflow">if</span>(labels_path.empty())</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    {</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;DummyAccessor&gt;(0);</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    }</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    {</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;TopNPredictionsAccessor&gt;(labels_path, top_n, output_stream);</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    }</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab7e905c7bfd2944e67bd069a3de3e7a2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::unique_ptr&lt;<a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a>&gt; arm_compute::graph_utils::get_random_accessor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_pixel_value.xhtml">PixelValue</a>&#160;</td>
          <td class="paramname"><em>lower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_pixel_value.xhtml">PixelValue</a>&#160;</td>
          <td class="paramname"><em>upper</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates appropriate random accessor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">lower</td><td>Lower random values bound </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>Upper random values bound </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed</td><td>Random generator seed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A ramdom accessor </dd></dl>

<p>Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00220">220</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;{</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;RandomAccessor&gt;(lower, upper, seed);</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a73a37a4970294106ed22e8f916ef3810"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::unique_ptr&lt;<a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">graph::ITensorAccessor</a>&gt; arm_compute::graph_utils::get_weights_accessor </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>data_file</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates appropriate weights accessor according to the specified path. </p>
<dl class="section note"><dt>Note</dt><dd>If path is empty will generate a <a class="el" href="classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml" title="Dummy accessor class. ">DummyAccessor</a> else will generate a <a class="el" href="classarm__compute_1_1graph__utils_1_1_num_py_bin_loader.xhtml" title="Numpy Binary loader class. ">NumPyBinLoader</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path to the data files </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_file</td><td>Relative path to the data files from path</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An appropriate tensor accessor </dd></dl>

<p>Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00234">234</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;{</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keywordflow">if</span>(path.empty())</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    {</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;DummyAccessor&gt;();</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    {</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        <span class="keywordflow">return</span> arm_compute::support::cpp14::make_unique&lt;NumPyBinLoader&gt;(path + data_file);</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    }</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9216738b309b6b230b7ba8bca5ba7477"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacearm__compute_1_1graph.xhtml#a8d5e69e9a697c2007e241eb413c9833b">graph::TargetHint</a> arm_compute::graph_utils::set_target_hint </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Utility function to return the TargetHint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">target</td><td>Integer value which expresses the selected target. Must be 0 for NEON, 1 for OpenCL or 2 for OpenCL with Tuner</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the TargetHint </dd></dl>

<p>Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00276">276</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>

<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00297">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="namespacearm__compute_1_1graph.xhtml#a8d5e69e9a697c2007e241eb413c9833bacaf162e9233294cadf62d2a71a14ca09">arm_compute::graph::NEON</a>, <a class="el" href="namespacearm__compute_1_1graph.xhtml#a8d5e69e9a697c2007e241eb413c9833ba542f952490e2db695a1d544338a70cda">arm_compute::graph::OPENCL</a>, and <a class="el" href="classarm__compute_1_1graph_1_1_graph.xhtml#aa8e898112793d13b363806c4332f1832">Graph::opencl_is_available()</a>.</p>
<div class="fragment"><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;{</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(target &gt; 2, <span class="stringliteral">&quot;Invalid target. Target must be 0 (NEON), 1 (OpenCL) or 2 (OpenCL with Tuner)&quot;</span>);</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keywordflow">if</span>((target == 1 || target == 2) &amp;&amp; <a class="code" href="namespacearm__compute.xhtml#aa4f4d7a58287017588fc338965873f14">graph::Graph::opencl_is_available</a>())</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    {</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        <span class="comment">// If type of target is OpenCL, check if OpenCL is available and initialize the scheduler</span></div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <span class="keywordflow">return</span> graph::TargetHint::OPENCL;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    }</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    {</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <span class="keywordflow">return</span> graph::TargetHint::NEON;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    }</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;}</div><div class="ttc" id="namespacearm__compute_xhtml_aa4f4d7a58287017588fc338965873f14"><div class="ttname"><a href="namespacearm__compute.xhtml#aa4f4d7a58287017588fc338965873f14">arm_compute::opencl_is_available</a></div><div class="ttdeci">bool opencl_is_available()</div></div>
<div class="ttc" id="core_2_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00297">Error.h:297</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml">graph_utils</a></li>
    <li class="footer">Generated on Fri Mar 2 2018 12:37:59 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
